package com.redoor.app.stake.basicdata.service.impl;

import com.redoor.app.stake.auth.commons.DatabaseServiceStatus;
import com.redoor.app.stake.basicdata.dao.SyncChargerFeeModelMapper;
import com.redoor.app.stake.basicdata.model.SyncChargerFeeModel;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseChargerfeemodelCriteria;
import com.redoor.app.stake.basicdata.service.SyncChargerFeeModelService;

import com.redoornetwork.framework.mybatis.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by wangjunlei on 2018-03-07 17:00:35.
 */
@Service
public class SyncChargerFeeModelServiceImpl extends AbstractService<SyncChargerFeeModel, String> implements SyncChargerFeeModelService {

    @Autowired
    private SyncChargerFeeModelMapper syncChargerFeeModelMapper;

    @Override
    public List<SyncChargerFeeModel> queryChargerFeeModel(BaseChargerfeemodelCriteria criteria) {
        return syncChargerFeeModelMapper.queryChargerFeeModel(criteria);
    }

    @Override
    public SyncChargerFeeModel qryChargerFeeModelById(String modelId) {
        SyncChargerFeeModel syncChargerFeeModel = new SyncChargerFeeModel();
        syncChargerFeeModel.setId(modelId);
        syncChargerFeeModel.setStatus(Integer.valueOf(DatabaseServiceStatus.SERVICE_NORMAL_STATUS.getCode()));
        return this.syncChargerFeeModelMapper.selectOne(syncChargerFeeModel);
    }
}
